from backend.common.database import Base
from sqlalchemy import Column,Integer,DATETIME
from datetime import datetime

class BaseModel(Base):
    # 定义为抽象类，只能被继承，不能实例化
    __abstract__ = True
    # 默认字段
    create_time = Column(DATETIME, default=datetime.now, comment="创建时间")
    update_time = Column(DATETIME, default=datetime.now, comment="更新时间")
    is_delete = Column(Integer, default=0, comment="删除标识：0-正常 1-已删除")